wayland: Don't forget to reapply margins
authorMatthias Clasen <mclasen@redhat.com>
Tue, 6 Oct 2020 00:17:50 +0000 (20:17 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Tue, 6 Oct 2020 00:17:50 +0000 (20:17 -0400)
When using the saved size because the compositor
told us to, we were forgetting to readd the margins.

The visible symptom of this was the window getting
smaller every time we went to tiled state and back.

gdk/wayland/gdksurface-wayland.c

index 87eaae752dc70451505e5eedaa4a9abda8fe0d47..72cbc8c2d785ee8b299931d84ba379965b2a0083 100644 (file)
@@ -1354,6 +1354,11 @@ gdk_wayland_surface_configure_toplevel (GdkSurface *surface)
           /* Save size for next time we get 0x0 */
           _gdk_wayland_surface_save_size (surface);
         }
+      else
+        {
+          width += impl->margin_left + impl->margin_right;
+          height += impl->margin_top + impl->margin_bottom;
+        }
 
       gdk_wayland_surface_resize (surface, width, height, impl->scale);
     }